<?php
require_once('./class/Note.php');

switch (@$_GET['action']) {
    default:
        echo "NOTE";
    break;

    case "addForm":
        $n = new Note();
        $n->setIdEvenement($_GET['id']);
        echo $n->getAddForm();
        break;

    case "doAdd":
        $n = new Note();
        $n->setIdIndividu($_POST['id_individu']);
        $n->setIdEvenement($_POST['id_evenement']);
        $n->setNote($_POST['note']);
        $n->addOrModify();
        echo _NOTE_.' '._ADDED_;
        break;
}
?>
